package com.group3.service.mqservice;

import com.group3.common.topic.LiveRoomTopic;
import com.group3.model.LiveRoom;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(topic = LiveRoomTopic.LIVE_ROOM_END, consumerGroup = "liveroom-end-group")
public class NotificationLiveRoomEndService implements  RocketMQListener<LiveRoom>{

    @Override
    public void onMessage(LiveRoom liveRoom) {
        log.info("关闭直播：{}", liveRoom.getName());
    }
}
